<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title></title>
  </head>
  <body>
    <div id="app">
      <input type="text" v-model="msg" placeholder="请输入英文">
      <div>{{msg|myfilter}}</div>
      <span :mm="msg|myfilter"></span>
    </div>
    <script src="./vue.js"></script>
    <script>
      const vm=new Vue({
        el:'#app',
        data:{msg:""},
        methods:{},
        filters:{
          myfilter(val){
            return val.slice(0,1).toUpperCase()+val.slice(1)
          }
        }
       })
    </script>
  </body>
</html>